package com.jqq.abstract_;

public class AbstractDetail {
    public static void main(String[] args) {
        Manager jack = new Manager("jack", 1, 8000,500);
        jack.work();
        CommonEmployee mary = new CommonEmployee("mary", 2, 3000);
        mary.work();
    }
}
abstract class A{
     public abstract  void hi();
}
class B extends A{
    public void hi() {

    }
}
abstract class Employee{
    private String name;
    private int id;
    private double salary;

    public Employee(String name, int id, double salary) {
        this.name = name;
        this.id = id;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public abstract void work();
}
class Manager extends Employee{
    private double bonus;

    public Manager(String name, int id, double salary, double bonus) {
        super(name, id, salary);
        this.bonus = bonus;
    }

    @Override
    public void work() {
        System.out.println("经理"+getName()+"工作中。。");
    }
}
class CommonEmployee extends Employee{
    public CommonEmployee(String name, int id, double salary) {
        super(name, id, salary);
    }

    @Override
    public void work() {
        System.out.println("普通员工"+getName()+"工作中。。");
    }
}